package com.nanyang.tms.dao.waybill;

import com.nanyang.tms.domain.waybill.WaybillIncomeFeeDO;
import com.nanyang.tms.domain.waybill.WaybillIncomeFeeQuery;
import com.nanyang.tms.domain.waybill.WaybillIncomeFeeVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>WaybillIncomeFeeDao.java</p>
 * <p>Description:()</p>
 *
 * @author lv
 * @date 2022年11月12日 下午10:52:52
 * @Copyright Copyright (c) 2020 www.nanyang.cn Inc. All rights reserved.
 */
@Mapper
public interface WaybillIncomeFeeDao {
    /**
     * <p>deleteByPrimaryKey</p>
     * <p>Description:(根据主键删除)</p>
     *
     * @param id
     * @return int
     */
    int deleteByPrimaryKey(Long id);

    /**
     * <p>insert</p>
     * <p>Description:(新增（所有列）)</p>
     *
     * @param record
     * @return int
     */
    int insert(WaybillIncomeFeeDO record);

    /**
     * <p>selectByPrimaryKey</p>
     * <p>Description:(根据主键查询)</p>
     *
     * @param id
     * @return WaybillIncomeFeeDO
     */
    WaybillIncomeFeeDO selectByPrimaryKey(Long id);

    /**
     * <p>updateByPrimaryKeySelective</p>
     * <p>Description:(修改(选择的列))</p>
     *
     * @param record
     * @return int
     */
    int update(WaybillIncomeFeeDO record);

    /**
     * 总数
     * @param query
     * @return
     */
    int countIncomeFee(WaybillIncomeFeeQuery query);

    /**
     * 列表
     * @param query
     * @return
     */
    List<WaybillIncomeFeeVO> listIncomeFee(WaybillIncomeFeeQuery query);

    /**
     * 收入
     * @param waybillCode
     * @return
     */
    Double sumIncomeFee(String waybillCode);
}